<?php
require_once('PHPUnit/Framework.php');
require_once("../SMTransmitter/SMTransmitter.class.php");
require_once("../SMTransmitter/Reporter.interface.php");
require_once("../SMTransmitter/CurlReporter.class.php");
require_once("../SMTransmitter/SMMessage.class.php");
require_once("../SMTransmitter/Converter.class.php");

class SockReporterTest extends PHPUnit_Framework_TestCase{
    private $dao=null;

    protected function setUp(){
        $this->dao = new SockReporter();
    }

    public function testPost(){
        $url = "http://www.example.com?test=args";
        $result = $this->dao->post($url);
        $this->assertEquals($result, 137, "error: data mangled.");
    }

    public function testSendMessage(){
        $result = $this->dao->sendMessage("test message", "http://www.example.com");
        $this->assertGreaterThan(0,$result);
    }
}

?>